/**
 * 版权所有 (C), 2019-2019, XXX有限公司
 * 项目名：com.company.study.designpatterns.mediator
 * 文件名: ConcreteMediator
 * 日期: 2019/6/16 16:53
 * 说明:
 */
package com.company.study.designpatterns.mediator;

/**
 * 具体中介者
 *
 * @author Anbang713
 * @create 2019/6/16
 */
public class ConcreteMediator implements Mediator {

    /**
     * 对象类1
     */
    private Colleague1 colleague1;
    /**
     * 对象类2
     */
    private Colleague2 colleague2;

    @Override
    public void createMediator() {
        colleague1 = new Colleague1(this);
        colleague2 = new Colleague2(this);
    }

    @Override
    public void playGame() {
        colleague1.playGame();
        colleague2.playGame();
    }
}